﻿using Microsoft.AspNetCore.Http;
using Vin.Extension.ServerSentEvent.Model;

namespace Vin.Extension.ServerSentEvent.Client;

public interface ISseClientAdapter
{
    public string Id { get; }

    public Task HandleAsync();
    
    public Task PushMessageAsync<T>(SseMsg<T> message);

    public Task PushMessageAsync(SseMsg message);
    
    public Task PushMessageAsync(string data, string? eventName = null, string? id = null, string? retry = null);
    
    public Task DisconnectAsync();

}